package com.topisv.tms.rest.qimen.qmentity.request.deliveryorder;

import java.util.Date;
import java.util.List;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

import org.hibernate.validator.constraints.NotBlank;

import com.topisv.tms.rest.qimen.qmentity.ReceiverInfo;
import com.topisv.tms.rest.qimen.qmentity.SenderInfo;
import com.topisv.tms.tools.typeadapter.JaxbDateAdapter;

/**
 * 销售出库单
 *  Date          Author       Version       Description
 * ----------------------------------------------------------
 *  2015-5-8      CC            1.0           Create
 */
@XmlRootElement(name = "request")
@XmlAccessorType(XmlAccessType.FIELD)
public class DeliveryOrder {
    
    @NotBlank
	@XmlElement(name = "deliveryOrderCode")
	private String deliveryOrderCode;
    
    @NotBlank
	@XmlElement(name = "warehouseCode")
	private String warehouseCode;
	
	@NotBlank
	@XmlElement(name = "orderType")
	private String orderType;
	@XmlElement(name = "orderFlag")
	private String orderFlag;
	
	@NotBlank
	@XmlElement(name = "sourcePlatformCode")
	private String sourcePlatformCode;
	@XmlElement(name = "sourcePlatformName")
	private String sourcePlatformName;
	@XmlJavaTypeAdapter(JaxbDateAdapter.class)
	
	@NotNull
	@XmlElement(name = "createTime")
	private Date createTime;
	@XmlJavaTypeAdapter(JaxbDateAdapter.class)
	
	@NotNull
	@XmlElement(name = "placeOrderTime")
	private Date placeOrderTime;
	@XmlJavaTypeAdapter(JaxbDateAdapter.class)
	@XmlElement(name = "payTime")
	private Date payTime;
	@XmlElement(name = "payNo")
	private String payNo;
	
	@NotNull
	@XmlJavaTypeAdapter(JaxbDateAdapter.class)
	@XmlElement(name = "operateTime")
	private Date operateTime;
	
	@NotBlank
	@XmlElement(name = "shopNick")
	private String shopNick;
	@XmlElement(name = "sellerNick")
	private String sellerNick;
	@XmlElement(name = "totalAmount")
	private Double totalAmount;
	@XmlElement(name = "itemAmount")
	private Double itemAmount;
	@XmlElement(name = "discountAmount")
	private Double discountAmount;
	@XmlElement(name = "freight")
	private Double freight;
	@XmlElement(name = "arAmount")
	private Double arAmount;
	@XmlElement(name = "gotAmount")
	private Double gotAmount;
	@XmlElement(name = "serviceFee")
	private Double serviceFee;
	
	@NotBlank
	@XmlElement(name = "logisticsCode")
	private String logisticsCode;
	@XmlElement(name = "logisticsName")
	private String logisticsName;
	@XmlElement(name = "expressCode")
	private String expressCode;
	@XmlElement(name = "logisticsAreaCode")
	private String logisticsAreaCode;
	@XmlElement(name = "buyerNick")
	private String buyerNick;
	@XmlElement(name = "deliveryRequirements")
	private DeliveryRequirement deliveryRequirement;
	
	@XmlElement(name = "senderInfo")
	private SenderInfo senderInfo;
	
	@Valid
	@NotNull
	@XmlElement(name = "receiverInfo")
	private ReceiverInfo receiverInfo;
	@XmlElement(name = "isUrgency")
	private String isUrgency;
	@XmlElement(name = "invoiceFlag")
	private String invoiceFlag;
	@XmlElementWrapper(name = "invoices")
	@XmlElement(name = "invoice")
	private List<Invoice> invoices;
	@XmlElement(name = "insuranceFlag")
	private String insuranceFlag;
	@XmlElement(name = "insurance")
	private Insurance insurance;
	@XmlElement(name = "buyerMessage")
	private String buyerMessage;
	@XmlElement(name = "sellerMessage")
	private String sellerMessage;

	public String getDeliveryOrderCode() {
		return deliveryOrderCode;
	}

	public void setDeliveryOrderCode(String deliveryOrderCode) {
		this.deliveryOrderCode = deliveryOrderCode;
	}

	public String getWarehouseCode() {
		return warehouseCode;
	}

	public void setWarehouseCode(String warehouseCode) {
		this.warehouseCode = warehouseCode;
	}

	public String getOrderType() {
		return orderType;
	}

	public void setOrderType(String orderType) {
		this.orderType = orderType;
	}

	public String getOrderFlag() {
		return orderFlag;
	}

	public void setOrderFlag(String orderFlag) {
		this.orderFlag = orderFlag;
	}

	public String getSourcePlatformCode() {
		return sourcePlatformCode;
	}

	public void setSourcePlatformCode(String sourcePlatformCode) {
		this.sourcePlatformCode = sourcePlatformCode;
	}

	public String getSourcePlatformName() {
		return sourcePlatformName;
	}

	public void setSourcePlatformName(String sourcePlatformName) {
		this.sourcePlatformName = sourcePlatformName;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getPlaceOrderTime() {
		return placeOrderTime;
	}

	public void setPlaceOrderTime(Date placeOrderTime) {
		this.placeOrderTime = placeOrderTime;
	}

	public Date getPayTime() {
		return payTime;
	}

	public void setPayTime(Date payTime) {
		this.payTime = payTime;
	}

	public String getPayNo() {
		return payNo;
	}

	public void setPayNo(String payNo) {
		this.payNo = payNo;
	}

	public Date getOperateTime() {
		return operateTime;
	}

	public void setOperateTime(Date operateTime) {
		this.operateTime = operateTime;
	}

	public String getShopNick() {
		return shopNick;
	}

	public void setShopNick(String shopNick) {
		this.shopNick = shopNick;
	}

	public String getSellerNick() {
		return sellerNick;
	}

	public void setSellerNick(String sellerNick) {
		this.sellerNick = sellerNick;
	}

	public Double getTotalAmount() {
		return totalAmount;
	}

	public void setTotalAmount(Double totalAmount) {
		this.totalAmount = totalAmount;
	}

	public Double getItemAmount() {
		return itemAmount;
	}

	public void setItemAmount(Double itemAmount) {
		this.itemAmount = itemAmount;
	}

	public Double getDiscountAmount() {
		return discountAmount;
	}

	public void setDiscountAmount(Double discountAmount) {
		this.discountAmount = discountAmount;
	}

	public Double getFreight() {
		return freight;
	}

	public void setFreight(Double freight) {
		this.freight = freight;
	}

	public Double getArAmount() {
		return arAmount;
	}

	public void setArAmount(Double arAmount) {
		this.arAmount = arAmount;
	}

	public Double getGotAmount() {
		return gotAmount;
	}

	public void setGotAmount(Double gotAmount) {
		this.gotAmount = gotAmount;
	}

	public Double getServiceFee() {
		return serviceFee;
	}

	public void setServiceFee(Double serviceFee) {
		this.serviceFee = serviceFee;
	}

	public String getLogisticsCode() {
		return logisticsCode;
	}

	public void setLogisticsCode(String logisticsCode) {
		this.logisticsCode = logisticsCode;
	}

	public String getLogisticsName() {
		return logisticsName;
	}

	public void setLogisticsName(String logisticsName) {
		this.logisticsName = logisticsName;
	}

	public String getExpressCode() {
		return expressCode;
	}

	public void setExpressCode(String expressCode) {
		this.expressCode = expressCode;
	}

	public String getLogisticsAreaCode() {
		return logisticsAreaCode;
	}

	public void setLogisticsAreaCode(String logisticsAreaCode) {
		this.logisticsAreaCode = logisticsAreaCode;
	}

	public String getBuyerNick() {
		return buyerNick;
	}

	public void setBuyerNick(String buyerNick) {
		this.buyerNick = buyerNick;
	}

	public DeliveryRequirement getDeliveryRequirement() {
		return deliveryRequirement;
	}

	public void setDeliveryRequirement(DeliveryRequirement deliveryRequirement) {
		this.deliveryRequirement = deliveryRequirement;
	}

	public SenderInfo getSenderInfo() {
		return senderInfo;
	}

	public void setSenderInfo(SenderInfo senderInfo) {
		this.senderInfo = senderInfo;
	}

	public ReceiverInfo getReceiverInfo() {
		return receiverInfo;
	}

	public void setReceiverInfo(ReceiverInfo receiverInfo) {
		this.receiverInfo = receiverInfo;
	}

	public String getIsUrgency() {
		return isUrgency;
	}

	public void setIsUrgency(String isUrgency) {
		this.isUrgency = isUrgency;
	}

	public String getInvoiceFlag() {
		return invoiceFlag;
	}

	public void setInvoiceFlag(String invoiceFlag) {
		this.invoiceFlag = invoiceFlag;
	}

	public String getInsuranceFlag() {
		return insuranceFlag;
	}

	public List<Invoice> getInvoices() {
		return invoices;
	}

	public void setInvoices(List<Invoice> invoices) {
		this.invoices = invoices;
	}

	public void setInsuranceFlag(String insuranceFlag) {
		this.insuranceFlag = insuranceFlag;
	}

	public Insurance getInsurance() {
		return insurance;
	}

	public void setInsurance(Insurance insurance) {
		this.insurance = insurance;
	}

	public String getBuyerMessage() {
		return buyerMessage;
	}

	public void setBuyerMessage(String buyerMessage) {
		this.buyerMessage = buyerMessage;
	}

	public String getSellerMessage() {
		return sellerMessage;
	}

	public void setSellerMessage(String sellerMessage) {
		this.sellerMessage = sellerMessage;
	}

}
